/**
 * @Classname TestObserver
 * @Description TODO
 * @Date 2023/9/1 13:52
 * @Created by wpc
 */
public class TestObserver {
    public static void main(String[] args) {
        Subject subject = new Subject();
        new FirstObserver(subject);
        new SecondObserver(subject);
        System.out.println("First state change: 15");
        subject.setState(15);
        System.out.println("Second state change: 10");
        subject.setState(10);
    }
}
